package com.kjtpay.design_pattern;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import com.kjtpay.design_pattern.abstract_factory.AbstractFactoryActivity;
import com.kjtpay.design_pattern.adapter.AdapterActivity;
import com.kjtpay.design_pattern.bridge.BridgeActivity;
import com.kjtpay.design_pattern.builder.BuilderActivity;
import com.kjtpay.design_pattern.chain.ChainActivity;
import com.kjtpay.design_pattern.command.CommandActivity;
import com.kjtpay.design_pattern.composite.CompositeActivity;
import com.kjtpay.design_pattern.decorator.DecoratorActivity;
import com.kjtpay.design_pattern.facade.FacadeActivity;
import com.kjtpay.design_pattern.factory.FactoryActivity;
import com.kjtpay.design_pattern.flyweight.FlyweightActivity;
import com.kjtpay.design_pattern.interpreter.InterpreterActivity;
import com.kjtpay.design_pattern.iterator.IteratorActivity;
import com.kjtpay.design_pattern.mediator.MediatorActivity;
import com.kjtpay.design_pattern.memento.MementoActivity;
import com.kjtpay.design_pattern.observer.ObserverActivity;
import com.kjtpay.design_pattern.prototype.PrototypeActivity;
import com.kjtpay.design_pattern.proxy.ProxyActivity;
import com.kjtpay.design_pattern.simple_factory.SimpleFactoryActivity;
import com.kjtpay.design_pattern.singleton.SingletonActivity;
import com.kjtpay.design_pattern.state.StateActivity;
import com.kjtpay.design_pattern.strategy.StrategyActivity;
import com.kjtpay.design_pattern.template_method.TemplateMethodActivity;
import com.kjtpay.design_pattern.visitor.VisitorActivity;

import java.lang.reflect.Proxy;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        setTitle("大话设计模式");
    }

    public void onSimpleFactoryClick(View view) {
        SimpleFactoryActivity.launch(MainActivity.this);
    }

    public void onStrategyClick(View view) {
        StrategyActivity.launch(MainActivity.this);
    }

    public void onDecoratorClick(View view) {
        DecoratorActivity.launch(MainActivity.this);
    }

    public void onProxyClick(View view) {
        ProxyActivity.launch(MainActivity.this);
    }

    public void onFactoryClick(View view) {
        FactoryActivity.launch(MainActivity.this);
    }

    public void onPrototypeClick(View view) {
        PrototypeActivity.launch(MainActivity.this);
    }

    public void onTemplateMethodClick(View view) {
        TemplateMethodActivity.launch(MainActivity.this);
    }

    public void onFacadeClick(View view) {
        FacadeActivity.launch(MainActivity.this);
    }

    public void onBuilderClick(View view) {
        BuilderActivity.launch(MainActivity.this);
    }

    public void onObserverClick(View view) {
        ObserverActivity.launch(MainActivity.this);
    }

    public void onStateClick(View view) {
        StateActivity.launch(MainActivity.this);
    }

    public void onAdapterClick(View view) {
        AdapterActivity.launch(MainActivity.this);
    }

    public void onMementoClick(View view) {
        MementoActivity.launch(MainActivity.this);
    }

    public void onCompositeClick(View view) {
        CompositeActivity.launch(MainActivity.this);
    }

    public void onIteratorClick(View view) {
        IteratorActivity.launch(MainActivity.this);
    }

    public void onSingletonClick(View view) {
        SingletonActivity.launch(MainActivity.this);
    }

    public void onBridgeClick(View view) {
        BridgeActivity.launch(MainActivity.this);
    }

    public void onCommandClick(View view) {
        CommandActivity.launch(MainActivity.this);
    }

    public void onChainClick(View view) {
        ChainActivity.launch(MainActivity.this);
    }

    public void onMediatorClick(View view) {
        MediatorActivity.launch(MainActivity.this);
    }

    public void onFlyweightClick(View view) {
        FlyweightActivity.launch(MainActivity.this);
    }

    public void onInterpreterClick(View view) {
        InterpreterActivity.launch(MainActivity.this);
    }

    public void onVisitorClick(View view) {
        VisitorActivity.launch(MainActivity.this);
    }

    public void onAbstractFactoryClick(View view) {
        AbstractFactoryActivity.launch(MainActivity.this);
    }
}